package cn.azy.activemq.consumer.role;

import cn.azy.activemq.consumer.utils.UrlUtil;
import cn.azy.activemq.entity.Message;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @ Author     ：AZY.
 * @ Date       ：Created in 17:04 2019/10/16
 * @ Description：${DESCRIPTION}
 */
@Component
@Slf4j
public class TopicAddFriendReceiver1 {

    @JmsListener(destination = "TOPIC_RECEIVE_ADD_FIREND", containerFactory = "MyjmsTopicListener")
    public void receiveAddFriend(Message msg) throws IOException {
        UrlUtil.Connect(msg);
        log.info("Topic小明1号："+msg);
    }
}
